package com.whc.gulimall.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whc.gulimall.product.entity.AttrEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品属性
 *
 * @author wanghaochen
 * @email angaoen@outlook.com
 * @date 2022-03-05 00:18:53
 */
@Mapper
public interface AttrDao extends BaseMapper<AttrEntity> {

    /**
     * 通过商品所拥有的属性id在pms_attr表中获取到可被检索的属性
     *
     * @param attrIds    属性id列表
     * @param searchType 检索
     * @return 可被检索的属性列表ids
     */
    List<Long> listSearchAttrIdsByAttrIds(@Param("attrIds") List<Long> attrIds,
                                          @Param("searchType") Integer searchType);
}
